import Vue from 'vue';
import 'normalize.css';
import FastClick from 'fastclick';
import { Dialog } from 'mand-mobile';
import App from './App.vue';
import router from './router';
import store from './store';
import windowResize from './mixins/windowResize';
import './permissions';
import './assets/stylus/index.styl';
import './assets/stylus/theme.custom.styl';

// eslint-disable-next-line
if ('addEventListener' in document && 'ontouchstart' in window) {
  FastClick.prototype.focus = targetElement => {
    targetElement.focus();
  };
  document.addEventListener('DOMContentLoaded', () => {
    FastClick.attach(document.body);
  }, false);
}

Vue.use(Dialog);

Vue.mixin(windowResize);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
